package warmachineroster.ui.views;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.part.ViewPart;

public class TierView extends ViewPart {

	public static final String ID = "warmachineroster.ui.views.TierView"; //$NON-NLS-1$
	private final FormToolkit toolkit = new FormToolkit(Display.getCurrent());

	public TierView() {
	}

	/**
	 * Create contents of the view part.
	 * @param parent
	 */
	@Override
	public void createPartControl(Composite parent) {
		Composite container = toolkit.createComposite(parent, SWT.NONE);
		toolkit.paintBordersFor(container);
		container.setLayout(new RowLayout(SWT.HORIZONTAL));
		
		Section section = toolkit.createSection(container, Section.TWISTIE | Section.TITLE_BAR);
		toolkit.paintBordersFor(section);
		section.setText("New Section");
		
		Section section_1 = toolkit.createSection(container, Section.TWISTIE | Section.TITLE_BAR);
		toolkit.paintBordersFor(section_1);
		section_1.setText("New Section");
		
		Section section_2 = toolkit.createSection(container, Section.TWISTIE | Section.TITLE_BAR);
		toolkit.paintBordersFor(section_2);
		section_2.setText("New Section");

		createActions();
		initializeToolBar();
		initializeMenu();
	}

	public void dispose() {
		toolkit.dispose();
		super.dispose();
	}

	/**
	 * Create the actions.
	 */
	private void createActions() {
		// Create the actions
	}

	/**
	 * Initialize the toolbar.
	 */
	private void initializeToolBar() {
		//IToolBarManager tbm = getViewSite().getActionBars().getToolBarManager();
	}

	/**
	 * Initialize the menu.
	 */
	private void initializeMenu() {
//		IMenuManager manager = getViewSite().getActionBars().getMenuManager();
	}

	@Override
	public void setFocus() {
		// Set the focus
	}
}
